<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<div style="padding:10px; overflow:hidden;">
	    	<div class="main_top" style="clear:both;"><h4>温馨提示：</h4>
    			<ul>
    				<li class="green">1.</li>
    				<li class="green">2.</li>
    			</ul>
	    	</div>
	    </div>
	    <form action="{:U('doUpd')}" method="post" name="form_edit" id="form_edit">
	    	<input type="hidden" name="id" id="id" class="input-text" value="{$detail.id}">
	        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
	            <tr>
	                <th width="50">标识:</th>
	                <td width="500">
	                	<input type="text" name="type" id="type" class="input-text" value="{$detail.type}">
	                </td>
	                <td><div id="typeTip"></div></td>
	            </tr>
	            <tr>
	                <th>名称:</th>
	                <td><input type="text" name="title" id="title" class="input-text" value="{$detail.title}"></td>
	                <td><div id="titleTip"></div></td>
	            </tr>
	            <tr>
	                <th>内容:</th>
	                <td><textarea id="ke_content" name="content" style="width:90%;height:300px;visibility:hidden;">{$detail.content}</textarea></td>
	                <td><div id="ordlistTip"></div></td>
	            </tr>
	        </table>
	        <div class="btns">
	        	<input type="submit" name="submit" value="保存" >
	        	<input type="button" name="close" value="关闭" id="dialog_button_close">
	        </div>
	    </form>
	</div>
<script type="text/javascript" src="__ROOT__/statics/scripts/kindeditor/kindeditor-all-min.js"></script>
<script type="text/javascript">

		var editor;
		KindEditor.ready(function(ke) {
		  	editor = ke.create('#ke_content');
		});
		$(function(){	

			
			$.formValidator.initConfig({
				formID:"form_edit",
				submitOnce:true
			});
			
			var tips = {
				"typeTip":"请输入50字符以内",
				"titleTip":"请输入2-10个文字",
				"ordlistTip":"请输入0-9999之间的数字"
			}
			$("#type").formValidator({
				onShow:tips.typeTip,
				onFocus:tips.typeTip,
			}).inputValidator({
				min:1,
				max:50,
				onError:tips.typeTip
			});
			
			$("#title").formValidator({
					onShow:tips.titleTip,
					onFocus:tips.titleTip,
				}).inputValidator({
					min:2,
					max:50,
					onError:tips.titleTip
				});

		})
		
	
	</script>
</block>